package com.dc.adaptor.transport.wmq;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class SendWmqMeta implements WmqMeta{
	
	public static String ip;
	public static String port;
	public static String qmanager;
	public static String channel;
	public static String ccsid;
	public static String queue;
	public static String messageEncoding;
	public static boolean oneoff;
	public static long processInterval;
	public static long intervalOnNotMessage;
	public static long intervalOnError;

	@org.junit.Test
	public  void read(){
		InputStream inputStream = SendWmqMeta.class.getResourceAsStream("mqconfig.properties");
		Properties prop = new Properties();
		try {
			prop.load(inputStream);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		ip = prop.getProperty("ip");
		port = prop.getProperty("port");
		qmanager = prop.getProperty("qmanager");
		channel = prop.getProperty("channel");
		ccsid = prop.getProperty("ccsid");
		queue = prop.getProperty("queue");
		messageEncoding = prop.getProperty("messageEncoding");
//		oneoff = prop.getProperty("oneoff");
//		processInterval = prop.getProperty("processInterval");
//		intervalOnNotMessage = prop.getProperty("intervalOnNotMessage");
//		intervalOnError = prop.getProperty("intervalOnError");
		
	}
	
	


		
	
	
//	public void setIp(String ip) {
//		this.ip = ip;
//	}
//
//	public void setPort(String port) {
//		this.port = port;
//	}
//
//	public void setQmanager(String qmanager) {
//		this.qmanager = qmanager;
//	}
//
//	public void setChannel(String channel) {
//		this.channel = channel;
//	}
//
//	public void setCcsid(String ccsid) {
//		this.ccsid = ccsid;
//	}
//
//	public void setQueue(String queue) {
//		this.queue = queue;
//	}
//
//	public void setMessageEncoding(String messageEncoding) {
//		this.messageEncoding = messageEncoding;
//	}
//
//	public void setOneoff(boolean oneoff) {
//		this.oneoff = oneoff;
//	}
//
//	public void setProcessInterval(long processInterval) {
//		this.processInterval = processInterval;
//	}
//
//	public void setIntervalOnNotMessage(long intervalOnNotMessage) {
//		this.intervalOnNotMessage = intervalOnNotMessage;
//	}
//
//	public void setIntervalOnError(long intervalOnError) {
//		this.intervalOnError = intervalOnError;
//	}

	@Override
	public String getCcsid() {
		// TODO Auto-generated method stub
		return ccsid;
	}

	@Override
	public String getChannel() {
		// TODO Auto-generated method stub
		return channel;
	}

	@Override
	public long getIntervalOnError() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public long getIntervalOnNotMessage() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String getIp() {
		// TODO Auto-generated method stub
		return ip;
	}

	@Override
	public String getMessageEncoding() {
		// TODO Auto-generated method stub
		return messageEncoding;
	}

	@Override
	public String getPort() {
		// TODO Auto-generated method stub
		return port;
	}

	@Override
	public long getProcessInterval() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String getQmanager() {
		// TODO Auto-generated method stub
		return qmanager;
	}

	@Override
	public String getQueue() {
		// TODO Auto-generated method stub
		return queue;
	}

	@Override
	public boolean isOneoff() {
		// TODO Auto-generated method stub
		return false;
	}







	@Override
	public boolean isCompress() {
		// TODO Auto-generated method stub
		return false;
	}

}
